﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace basic
{
    public partial class pophelp : Form
    {
        private const string helpfile = "mk:@MSITStore:mspaint.chm";
       Uri helpfileuri = new Uri(helpfile);
        public pophelp(int selection)
        {
            InitializeComponent();
            TypeConverter converter;
            converter = TypeDescriptor.GetConverter(typeof(HelpNavigator));
            foreach (object value in converter.GetStandardValues())
            {
                navigatorCombo.Items.Add(value);
            }
      
            switch (selection)
            {
                case 1:
                    parameterTextBox.Text = "One";
                    break;

                case 2:
                    parameterTextBox.Text = "two";
                    break;

                case 3:
                    parameterTextBox.Text = "three";
                    break;

                case 4:

                    parameterTextBox.Text = "four";
                    break;


            }

        }

        private void richTextBox1_TextChanged(object sender, EventArgs e)
        {

        }

        private void button1_Click(object sender, EventArgs e)
        {
            // Display Help using the Help navigator enumeration 
            // that is selected in the combo box. Some enumeration 
            // values make use of an extra parameter, which can 
            // be passed in through the Parameter text box.
            HelpNavigator navigator = HelpNavigator.TableOfContents;
            if (navigatorCombo.SelectedItem != null)
            {
                navigator = (HelpNavigator)navigatorCombo.SelectedItem;
            }
            Help.ShowHelp(this, helpfile, navigator, parameterTextBox.Text);
        }

        private void button2_Click(object sender, EventArgs e)
        {
            // Display the index for the help file.
            Help.ShowHelpIndex(this, helpfile);

        }

        private void button3_Click(object sender, EventArgs e)
        {
            Help.ShowHelp(this, helpfile, keyword.Text);

        }
    }
}
    